//
//  NextCaiJingViewController.m
//  網易
//
//  Created by 赵天宇 on 16/9/12.
//  Copyright © 2016年 赵天宇. All rights reserved.
//

#import "NextCaiJingViewController.h"

@interface NextCaiJingViewController (){
    UIWebView *wbV;
    
}


@end

@implementation NextCaiJingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSURL *url = [NSURL URLWithString:self.ss];
    NSURLRequest *request = [[NSURLRequest alloc]initWithURL:url];
    wbV = [[UIWebView alloc]initWithFrame:self.view.frame];
    [wbV loadRequest:request];
    [self.view addSubview:wbV];
    UIButton *btn = [UIButton buttonWithType:0];
    btn.frame=CGRectMake(0, 0, 50, 50);
    btn.center=CGPointMake(self.view.frame.size.width/2, self.view.frame.size.height-30);
    btn.backgroundColor = [UIColor clearColor];
    [btn setTitle:@"返回" forState:0];
    [btn setTitleColor:[UIColor grayColor] forState:0];
    [btn addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
    [wbV addSubview:btn];
    // Do any additional setup after loading the view.
}
-(void)back{
    CATransition *tran = [CATransition animation];
    tran.duration=3;
    //    tran.type=@"cameraIrisHollowOpen";
    //    pageCurl            向上翻一页
    //    pageUnCurl          向下翻一页
    //    rippleEffect        滴水效果
    //    suckEffect          收缩效果，如一块布被抽走
    //    cube                立方体效果
    //    oglFlip             上下翻转效果
    tran.type=@"rippleEffect";
    tran.subtype=kCAAlignmentLeft;
    [self.view.window.layer addAnimation:tran forKey:nil];
    [self dismissViewControllerAnimated:YES completion:nil];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
